﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using JobUtil.GeneralLib;
using Oracle.DataAccess.Client;
using System.Configuration;

namespace JobUtil.DalLib
{
    public class DbConnectorClass
    {
        
        // Create connection based on connect string in ConstantValueClass
        public string ConnectionName {get; set;}

        protected OracleConnection OConnection = new OracleConnection();

        public DbConnectorClass(string connectionName) 
        { 
            // Open connection            
            OConnection.ConnectionString = connectionName;
            OConnection.Open();
        }

        public DbConnectorClass()
        {
            OConnection.ConnectionString = ConfigurationManager.AppSettings["DbConnectionString_PWDEV"];
            OConnection.Open();
        }

        


        public void Disconnect(){
            OConnection.Close();
        }
    }
}
